home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / kernel / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-05-05  |  4.2 KB  |  215 lines  |  [TEXT/R*ch]

  1. # Makefile for interface-independent code in Xconq.
  2. # Copyright (C) 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. # Xconq is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. prefix = /usr/games
  10.  
  11. srcdir = .
  12.  
  13. # Set this for wherever the library directory should be.
  14.  
  15. LIBDIR = $(srcdir)/../lib
  16.  
  17. # Set this for wherever the man page should live.
  18.  
  19. MANDIR = /usr/man/manl
  20.  
  21. SHELL = /bin/sh
  22.  
  23. INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
  24. INSTALL_PROGRAM = $(INSTALL)
  25. INSTALL_DATA = $(INSTALL)
  26.  
  27. CC = cc
  28.  
  29. CFLAGS = -g
  30.  
  31. AR = ar
  32.  
  33. RANLIB = ranlib
  34.  
  35. # Host and target-dependent makefile fragments come in here.
  36. ####
  37. # End of host and target-dependent makefile fragments.
  38.  
  39. LISP_H = lisp.h keyword.def
  40.  
  41. GAME_H = game.h utype.def mtype.def ttype.def gvar.def table.def
  42.  
  43. UNIT_H = unit.h action.def plan.def task.def goal.def
  44.  
  45. HISTORY_H = history.h history.def
  46.  
  47. ALL_H = conq.h config.h misc.h dir.h $(LISP_H) module.h $(GAME_H) \
  48.     player.h side.h $(UNIT_H) world.h $(HISTORY_H) score.h help.h \
  49.     ai.h version.h
  50.  
  51. # Non-interface-specific object files.
  52.  
  53. OBJS = \
  54.     init.o \
  55.     cmdline.o \
  56.     ai.o \
  57.     mplay.o \
  58.     actions.o \
  59.     combat.o \
  60.     run.o \
  61.     score.o \
  62.     world.o \
  63.     history.o \
  64.     module.o \
  65.     write.o \
  66.     read.o \
  67.     mkterr.o \
  68.     mkunits.o \
  69.     mkrivers.o \
  70.     mkroads.o \
  71.     mknames.o \
  72.     side.o \
  73.     unit.o \
  74.     plan.o \
  75.     task.o \
  76.     nlang.o \
  77.     ui.o \
  78.     ps.o \
  79.     help.o
  80.  
  81. LOBJS = \
  82.     imf.o \
  83.     lisp.o \
  84.     util.o \
  85.     unix.o
  86.  
  87. # Object files needed by nonspecialized executables.
  88.  
  89. GOBJS =    generic.o \
  90.     types.o \
  91.     tables.o
  92.  
  93. # Random C compiler flags.
  94.  
  95. UNIX_CFLAGS = -DUNIX -DUSE_CONSOLE -DXCONQLIB=\"$(LIBDIR)\"
  96.  
  97. # -DXCONQLIB=\"$(LIBDIR)\"
  98.  
  99. ALL_CFLAGS = $(CFLAGS) $(UNIX_CFLAGS) -I$(srcdir)
  100.  
  101. .c.o:
  102.     $(CC) -c $(ALL_CFLAGS) $<
  103.  
  104. # Do it all.
  105. # (We used to build skelconq always, but between it and the .a files and
  106. # all the debugging info, a lot of space is chewed up; so if you want to
  107. # run tests or whatever, build it explicitly.)
  108.  
  109. all: libconq.a libconqlow.a
  110.  
  111. # The kernel library.  This is linked with interface code.
  112.  
  113. libconq.a: $(OBJS) $(GOBJS)
  114.     rm -f libconq.a
  115.     $(AR) ru libconq.a $(OBJS) $(GOBJS) 
  116.     $(RANLIB) libconq.a
  117.  
  118. # The low-level kernel library.  This is linked with both complete games
  119. # and with GDL-using tools.
  120.  
  121. libconqlow.a: $(LOBJS)
  122.     rm -f libconqlow.a
  123.     $(AR) ru libconqlow.a $(LOBJS)
  124.     $(RANLIB) libconqlow.a
  125.  
  126. # Specialized version (note that generic type/table code not linked in).
  127. #
  128. #conq-s.a: $(OBJS)
  129. #    rm -f conq-s.a
  130. #    ar ru conq-s.a $(OBJS)
  131. #    ranlib conq-s.a
  132.  
  133. # Test version of xconq.
  134.  
  135. skelconq: skelconq.o compile.o libconq.a libconqlow.a
  136.     rm -f skelconq
  137.     $(CC) -o skelconq $(ALL_CFLAGS) skelconq.o compile.o libconq.a libconqlow.a
  138.  
  139. # Support things.
  140.  
  141. # (should do with a shell script, then can intercept failures)
  142. special.h: skelconq
  143.     skelconq <compile >special.h
  144.  
  145. install: all install-only
  146.  
  147. # Note that skelconq is not really something that we want to install
  148. # anywhere.
  149.  
  150. install-only:
  151.  
  152. # Usual cleaning, and flushing of anything junk-like.
  153.  
  154. clean:
  155.     rm -f *.o lint.out core
  156.     rm -f *.a *conq *.log
  157.  
  158. distclean: clean
  159.     rm -f Makefile config.status
  160.  
  161. realclean: distclean
  162.  
  163. Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  164.     $(SHELL) config.status
  165.  
  166. # All the .h dependencies.
  167.  
  168. init.o:        $(ALL_H)
  169. cmdline.o:    $(ALL_H)
  170. mknames.o:    $(ALL_H)
  171. ai.o:        $(ALL_H)
  172. actions.o:    $(ALL_H)
  173. combat.o:    $(ALL_H)
  174. plan.o:        $(ALL_H)
  175. task.o:        $(ALL_H)
  176. run.o:        $(ALL_H)
  177. score.o:    $(ALL_H)
  178. world.o:    $(ALL_H)
  179. history.o:    $(ALL_H)
  180. module.o:    $(ALL_H)
  181. read.o:        $(ALL_H) keyword.def
  182. write.o:    $(ALL_H)
  183. side.o:        $(ALL_H)
  184. unit.o:        $(ALL_H)
  185. help.o:        $(ALL_H)
  186. nlang.o:    $(ALL_H)
  187. util.o:        $(ALL_H)
  188. unix.o:        $(ALL_H)
  189. mkunits.o:    $(ALL_H)
  190. mkterr.o:    $(ALL_H)
  191. mkrivers.o:    $(ALL_H)
  192. mkroads.o:    $(ALL_H)
  193.  
  194. generic.o:    config.h misc.h $(LISP_H) $(GAME_H)
  195. types.o:    config.h misc.h $(LISP_H) $(GAME_H)
  196. tables.o:    config.h misc.h $(LISP_H) $(GAME_H)
  197.  
  198. imf.o:        config.h misc.h $(LISP_H) imf.h
  199.  
  200. lisp.o:        config.h misc.h $(LISP_H)
  201.  
  202. ui.o:        $(ALL_H) ui.h imf.h
  203.  
  204. ps.o:        $(ALL_H) print.h
  205.  
  206. mplay.o:    $(ALL_H) mplay.h
  207.  
  208. skelconq.o:    $(ALL_H) print.h
  209.  
  210. # This *must* be compiled by a proper ANSI compiler.
  211.  
  212. compile.o:    $(ALL_H)
  213. #    gcc $(ALL_CFLAGS) -c compile.c
  214. #    $(CC) -c compile.c
  215.